home *** CD-ROM | disk | FTP | other *** search
/ Champak 142 / Volume 142 Oct 17 2011 - Damaged.iso / Games / operation-graduates.swf / scripts / DefineSprite_958_frame / frame_2 / DoAction.as
Text File  |  2011-10-17  |  1KB  |  48 lines

  1. this.back.gotoAndStop("inactive");
  2. this.next.gotoAndStop("inactive");
  3. this.play.gotoAndStop("inactive");
  4. if(this.back.hitTest(_root._xmouse,_root._ymouse,false))
  5. {
  6.    this.back.gotoAndPlay("active");
  7. }
  8. if(this.next.hitTest(_root._xmouse,_root._ymouse,false))
  9. {
  10.    this.next.gotoAndPlay("active");
  11. }
  12. this.next.onDragOver = this.next.onRollOver = function()
  13. {
  14.    this.gotoAndPlay("active");
  15.    _root.playSound("sound.rollover");
  16. };
  17. this.next.onDragOut = this.next.onRollOut = function()
  18. {
  19.    this.gotoAndStop("inactive");
  20. };
  21. this.next.onPress = function()
  22. {
  23.    _root.playSound("sound.onpress");
  24. };
  25. this.next.onRelease = function()
  26. {
  27.    _parent.frame.nextFrame();
  28.    _root.playSound("sound.onrelease");
  29. };
  30. this.back.onDragOver = this.back.onRollOver = function()
  31. {
  32.    this.gotoAndPlay("active");
  33.    _root.playSound("sound.rollover");
  34. };
  35. this.back.onDragOut = this.back.onRollOut = function()
  36. {
  37.    this.gotoAndStop("inactive");
  38. };
  39. this.back.onPress = function()
  40. {
  41.    _root.playSound("sound.onpress");
  42. };
  43. this.back.onRelease = function()
  44. {
  45.    _root.playSound("sound.onrelease");
  46.    _parent.frame.prevFrame();
  47. };
  48.